import { axios as request  } from '@/utils/request'
import qs from "qs";

export function getWaitList({params}) {
  return request({
    url: 'api/order-abnormal/wait?' + qs.stringify(params, {indices: false, encode: false}),
    method: 'get'
  })
}

export function getFinishList({params}) {
  return request({
    url: 'api/order-abnormal/relieve/page?' + qs.stringify(params, {indices: false, encode: false}),
    method: 'get'
  })
}

export function add(data) {
  return request({
    url: 'api/order-abnormal/record',
    method: 'post',
    data
  })
}

export function getResult(id) {
  return request({
    url: `api/order-abnormal/record/${id}`,
    method: 'get'
  })
}

export function punish(id) {
  return request({
    url: `api/order-abnormal/punish/${id}`,
    method: 'put'
  })
}

export function relieve(id) {
  return request({
    url: `api/order-abnormal/relieve/${id}`,
    method: 'put'
  })
}